package org.jeecg.modules.inventory.mapper;

import java.util.List;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.jeecg.modules.inventory.entity.BussInventory;
import org.jeecg.modules.inventory.entity.BussInventoryInoutDetails;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;

/**
 * @Description: 库存出入库明细
 * @Author: jeecg-boot
 * @Date:   2024-07-01
 * @Version: V1.0
 */
public interface BussInventoryInoutDetailsMapper extends BaseMapper<BussInventoryInoutDetails> {

	/**
	 * 通过主表id删除子表数据
	 *
	 * @param mainId 主表id
	 * @return boolean
	 */
	public boolean deleteByMainId(@Param("mainId") String mainId);

  /**
   * 通过主表id查询子表数据
   *
   * @param mainId 主表id
   * @return List<BussInventoryInoutDetails>
   */
	public List<BussInventoryInoutDetails> selectByMainId(@Param("warehouseId") String warehouseId,@Param("materialId") String materialId);

	public IPage<BussInventoryInoutDetails> selectByDetailId(Page<BussInventoryInoutDetails> page,@Param("mainId") String mainId);

	public void deleteByBusinessId(@Param("businessId") String businessId,@Param("businessCode") String businessCode);

	public List<BussInventoryInoutDetails> selectForCopy(@Param("mainId") String mainId);

	public void deleteByDetailId(@Param("mainId") String mainId);
}
